package com.study.ktandroid.sometest

import android.os.Bundle
import android.widget.Button
import androidx.appcompat.app.AppCompatActivity
import com.study.ktandroid.R
import org.greenrobot.eventbus.EventBus
import org.jetbrains.anko.sdk27.coroutines.onClick

class KTest2Activity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_kt_android)
        findViewById<Button>(R.id.btn_coro_exam)
                .onClick {
                    EventBus.getDefault().post(Event("hehh"))
                    finish()
                }
    }
}